package models

import (
	"MaternalBaby/api/utils"
	"time"
)

type Person struct {
	Id         int
	CreatorId  int
	Name       string
	Avatar     string
	Birthday   string
	Sex        string
	IsDelete   bool
	CreateTime time.Time `orm:"auto_now_add;type(datetime)"`

	RecordList []Record `orm:"-"`
}

func (m *Person) G() Person {
	m.Avatar = utils.GetImageUrl(m.Avatar, "image/format,png")
	return *m
}
